package server.data;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;


public class User 
{
	private String strName;
	private InetAddress iaClientAddress;
	private int iPClientPort;
	private List<String> arrNotifications;

	public User(String strName)
	{
		this.strName=strName.toLowerCase();
		this.arrNotifications=new ArrayList<String>();
	}
	
	public String getStrName() 
	{
		return strName;
	}

	public InetAddress getIAClientAddress() 
	{
		return iaClientAddress;
	}
	
	public void setIAClientAddress(InetAddress iaClientAddress) 
	{
		this.iaClientAddress = iaClientAddress;
	}
	
	public int getiPClientPort() 
	{
		return iPClientPort;
	}
	
	public void setiPClientPort(int iPClientPort) 
	{
		this.iPClientPort = iPClientPort;
	}

	public List<String> getArrNotifications() {
		return arrNotifications;
	}


        public String toString()
        {
            return strName;
        }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final User other = (User) obj;
        if ((this.strName == null) ? (other.strName != null) : !this.strName.equals(other.strName)) {
            return false;
        }
        return true;
    }
}
